//
//  CycLabel.h
//  Cycling
//
//  Created by cjg.mini on 2023/4/25.
//

#import <YYKit/YYKit.h>

NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, CycLabelFontType) {
    CycLabelFontTypePrimaryTitle    = 0,   ///< 一级标题，粗体 24px
    CycLabelFontTypeSubTitle,           ///< 二级标题，粗体 18px
    CycLabelFontTypeBody,      ///< 正文，常规，18px
    CycLabelFontTypeDesc,          ///< 说明性文字，常规，14px
    CycLabelFontTypeSmallDesc,          ///< 说明性文字，常规，12px
};

typedef NS_ENUM(NSUInteger, CycLabelColorType) {
    CycLabelColorTypeDefault    = 0,   ///< 标准颜色-白色FFFFFF
    CycLabelColorTypeSecondary,           ///< 次要内容颜色-灰色8C8C8C
    CycLabelColorTypeImportant,      ///< 重要内容颜色-蓝色00A0E8
};
@interface CycLabel : YYLabel
@property (nonatomic, assign) CycLabelColorType colorType;     ///< 颜色分类，默认CycLabelColorTypeDefault 白色
@property (nonatomic, assign) CycLabelFontType fontType;   ///< 字体分类，默认CycLabelFontTypeBody

- (void)setText:(NSString *)text HighlightText:(NSString *)highlightText;
- (void)setText:(NSString *)text HighlightText:(NSString *)highlightText action:(void(^)(void))action;
- (void)setText:(NSString *)text HighlightText:(NSString *)highlightText underline:(BOOL)underline action:(void(^)(void))action;
- (void)setText:(NSString *)text HighlightText:(NSString *)highlightText highlightFont:(UIFont*)font underline:(BOOL)underline action:(void(^)(void))action;
- (void)setText:(NSString *)text lineSpacing:(CGFloat)lineSpacing wordSpace:(CGFloat)wordSpace;
- (void)setText:(NSString *)text HighlightText:(NSString *)highlightText highlightFont:(UIFont*)font underline:(BOOL)underline;
//用户隐私协议
- (void)setText:(NSString *)text HighlightUserText:(NSString *)usertext action:(void(^)(void))useraction HighlightPrivacyText:(NSString *)privacytext action:(void(^)(void))privacyaction;
- (CGFloat)getLabelHeightWithWidth:(CGFloat)width;
- (CGFloat)getLabelWidthWithHeight:(CGFloat)height;

+ (CGFloat)widthForString:(NSString *)value font:(UIFont*)font andHeight:(CGFloat)height;
+ (CGFloat)heightForString:(NSString *)value font:(UIFont*)font andWidth:(CGFloat)width;
@end

NS_ASSUME_NONNULL_END
